package com.psak.cudaphrasal.client;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * Hello world!
 * 
 */
public class AppClient {
	public static void main(String[] args) {
		loadContext(args);
	}

	private static ApplicationContext loadContext(String[] args) {
		if (args.length == 0) {
			return new ClassPathXmlApplicationContext("beans.xml");
		} else {
			String configPath = args[0];
			return new FileSystemXmlApplicationContext(configPath);
		}

	}
}
